#ifndef _DANIEL_KERR_GLSTRUCTS_H
#define _DANIEL_KERR_GLSTRUCTS_H

#include "driver.h"

struct light_S
{GLfloat position[4],ambient[4],diffuse[4],specular[4];};

class light_C
{
	public:
		light_C()
		{
			light_S bulb1 =
			{
				{0.0,2.0,0.0,1.0},
				{1.0,1.0,1.0,1.0},
				{1.0,1.0,1.0,1.0},
				{1.0,1.0,1.0,1.0}
			};
			lite.push_back(bulb1);
		}

		void enable()
		{glEnable(GL_LIGHTING); glEnable(GL_LIGHT1);}

		void disable()
		{glDisable(GL_LIGHTING); glDisable(GL_LIGHT1);}

		void apply()
		{
			for(unsigned int i=0;i<lite.size();++i)
			{
				glLightfv(GL_LIGHT1, GL_POSITION, lite[i].position);
				glLightfv(GL_LIGHT1, GL_AMBIENT, lite[i].ambient);
				glLightfv(GL_LIGHT1, GL_DIFFUSE, lite[i].diffuse);
				glLightfv(GL_LIGHT1, GL_SPECULAR, lite[i].specular);
			}
		}

	private:
		vector <light_S> lite;
};

#endif